#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>

@class FWListView;
@class FWApplication;
@class FWPreferences;
@class LITheme;


@protocol FWListViewDelegate <NSObject>

- (CGFloat)heightForItem:(NSObject*)item theme:(LITheme*)theme prefs:(FWPreferences*)prefs application:(FWApplication*)app;
- (void)setDetailsUsingView:(FWListView*)view forItem:(NSObject*)item theme:(LITheme*)theme prefs:(FWPreferences*)prefs application:(FWApplication*)app;
- (UIView*)previewWithFrame:(CGRect)rect atIndex:(NSInteger)index forItems:(NSArray*)list theme:(LITheme*)theme prefs:(FWPreferences*)prefs application:(FWApplication*)app;
- (NSString*)detailForHeader:(FWPreferences*)prefs application:(FWApplication*)app;

- (FWListView*)viewForTheme:(LITheme*)theme existing:(UIView*)existing prefs:(FWPreferences*)prefs application:(FWApplication*)app;
- (NSArray*)fetchNewDataForPrefs:(FWPreferences*)prefs application:(FWApplication*)app;
- (BOOL)shouldUpdateForDate:(NSDate*)date application:(FWApplication*)app;


@optional

- (void)repeatingEventWithPluginPrefs:(FWPreferences*)prefs application:(FWApplication*)app;

//- (NSInteger)tableView:(LITableView*)tableView totalNumberOfItems:(FWApplication*)application preferences:(FWPreferences*)prefs;

// Statusbar support
- (BOOL)isStatusbarRequiredForPrefs:(FWPreferences*)prefs application:(FWApplication*)app;
- (NSArray*)statusbarItemsForPrefs:(FWPreferences*)prefs application:(FWApplication*)app;
- (NSString*)statusbarCaptionForPrefs:(FWPreferences*)prefs application:(FWApplication*)app;
- (NSString*)statusbarBadgeForPrefs:(FWPreferences*)prefs application:(FWApplication*)app;
- (NSString*)statusbarCaptionIconForPrefs:(FWPreferences*)prefs application:(FWApplication*)app;
- (NSInteger)statusbarIndentForPrefs:(FWPreferences*)prefs application:(FWApplication*)app;
- (BOOL)shouldRebuildStatusbar:(NSArray*)items prefs:(FWPreferences*)prefs application:(FWApplication*)app;
- (BOOL)configureStatusbarItems:(NSArray*)items prefs:(FWPreferences*)prefs application:(FWApplication*)app;

// Toolbar support
- (NSArray*)toolbarItemsForPrefs:(FWPreferences*)prefs application:(FWApplication*)app;
- (BOOL)configureToolbarItems:(NSArray*)items prefs:(FWPreferences*)prefs application:(FWApplication*)app;

// System status bar support
- (NSString*)libstatusbarIconName;
- (BOOL)showLibstatusbarIconForItems:(NSArray*)items prefs:(FWPreferences*)prefs;

@end
